import { GSlider } from "../../../../com/mui/controls/GSlider";
import { SliderDirection } from "../../../../fl/controls/SliderDirection";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
//class SetterSlider
    
    export  class SetterSlider extends GSlider
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ positionThumb(): void
        {
            thumb.x = (_direction != SliderDirection.VERTICAL ? value - minimum : maximum - minimum - value) / (maximum - minimum) * (_width - thumb.width);
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            this.setStyle("sliderTrackSkin", GlobalClass.getBitmap("Slider_Track"));
            this.setStyle("sliderTrackDisabledSkin", GlobalClass.getBitmap("Slider_Track"));
            this.setStyle("thumbDisabledSkin", GlobalClass.getBitmap("Slider_Thumb"));
            this.setStyle("thumbDownSkin", GlobalClass.getBitmap("Slider_Thumb"));
            this.setStyle("thumbOverSkin", GlobalClass.getBitmap("Slider_Thumb"));
            this.setStyle("thumbUpSkin", GlobalClass.getBitmap("Slider_Thumb"));
            thumb.setSize(17, 20);
            track.setSize(125, 9);
            thumb.y = track.y - 5;
            return;
        }
    }
